package com.humanmonth.rea.pic;

import java.sql.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Blob;

/**
 * 图片
 * 
 * @author 林子龙
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Picture {
	/**
	 * 主键
	 */
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	/**
	 * 模块
	 */
	@Persistent
	private String module;
	/**
	 * 文件名
	 */
	@Persistent
	private String name;
	/**
	 * 内容
	 */
	@Persistent
	private Blob content;
	/**
	 * 保存时间
	 */
	@Persistent
	private Date date;

	public Picture(String module, String name,Blob content) {
		this.module = module;
		this.name=name;
		this.content = content;

	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Blob getContent() {
		return content;
	}

	public void setContent(Blob content) {
		this.content = content;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
